<?
 session_start();
 require("connect.php");
 require("checksessionsodaubai.php");
 $chon2=$_REQUEST["option2"];
 	switch ($chon2){		
		case "xuly":			
			mysql_query("update nguoidung set trangthai='1' where username='{$_REQUEST["maph"]}'") or die("Kiểm tra lại !");
			break;		
		case "koxuly":				
			mysql_query("update nguoidung set trangthai='0' where username='{$_REQUEST["maph"]}'") or die("Kiểm tra lại !");		
			break;
	}
?>
<html><!-- InstanceBegin template="/Templates/giaovientemplate.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="Javascript" src="scripts/innovaeditor.js"></script>
<link rel="stylesheet" type="text/css" href="css/engine.css" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<script language="javascript" type="text/javascript" src="js/datetimepicker.js">
</script>
</head>
<body>
<table align="center" width="938" cellpadding="0" cellspacing="1" border="0">
	<tr><td colspan="3" height="26" bgcolor="#CCCCCC">		
	<? $magiaovien=$_SESSION["username"];?>	
	<!--Menu 1-->
	<div id="tool">

	<a href="index.php">Trang chủ của trường</a>
		 | 
		<a href="hotrohoctap">Hỗ trợ học tập</a>

		 | 
		 
		<a href="lienhe.php">Liên hệ</a>
	</div>
	<!--het menu 1-->
	</td></tr>
	<tr><td colspan="3" height="34" bgcolor="#CCCCCC">	
	<div id="menuwrapper">
		<ul id="p7menubar">
			 <li><a class="trigger" href="giaovien.php?magv=<? echo $magiaovien;?>" target="_self">Trang chủ</a></li>
			  <li class="linemenus"></li>					 
		 	 <li><a class="trigger" href="trangcaclop.php" target="_self">Trang các lớp</a>	
			 <li class="linemenus"></li>					 
		 	 <li><a class="trigger" href="thongtincanhangv.php?magv=<? echo $magiaovien;?>" target="_self">Thông tin cá nhân</a>						  			 
		  <!--bat dau-->
		  	<?
				if ($_SESSION["login"]==true){
			?>
			 <li class="linemenus"></li>					 					 
					 <li><a class="trigger" href="logout.php" target="_self">Thoát</a>						
					<li class="linemenus"></li>
					<li><a class="trigger" href="logout.php" target="_self">
					<?
					$resu1=mysql_query("select * from giaovien where magv='{$magiaovien}'"); 
					$row1=mysql_fetch_array($resu1);
					echo "Xin chào : ";echo $row1["hotendem"];echo "&nbsp;";echo $row1["ten"];
					?>		
					<? }?>
					</a>			
		  <!--het-->
		</ul>
	</div>	
	</td></tr>
	<tr>
		<td width="175px" height="800" valign="top">		
		<!--menu trai-->
		<table align="center" width="100%" border="1" cellpadding="0" cellspacing="0">
		<tr><td valign="middle" height="30">
			<a href="quanlydiemkt.php?magv=<? echo $magiaovien;?>"><img src="anh/diemkt.png" height="16" width="16" border="0">&nbsp;</a><a href="quanlydiemkt.php?magv=<? echo $magiaovien;?>">Quản lý điểm kiểm tra</a>
		</td></tr>	
		<tr><td valign="middle" height="30">
			<a href="quanlydiemthi.php?magv=<? echo $magiaovien;?>"><img src="anh/diemthi.png" height="16" width="16" border="0">&nbsp;</a><a href="quanlydiemthi.php?magv=<? echo $magiaovien;?>">Quản lý điểm thi</a>
		</td></tr>	
		<tr><td valign="middle" height="30">
			<a href="thoikhoabieugv.php?magv=<? echo $magiaovien;?>"><img src="anh/thoikhoabieu.png" height="16" width="16" border="0">&nbsp;</a><a href="thoikhoabieugv.php?magv=<? echo $magiaovien;?>">Thời khóa biểu</a>
		</td></tr>	
		<?
			$resu=mysql_query("select * from lop where magvcn='{$magiaovien}'");
			if(mysql_num_rows($resu)>0){
		?>
		<!--Begin menu cua giao vien chu nhiem-->
		<tr><td valign="middle" height="30">
			<a href="quanlybaiviet.php?magv=<? echo $magiaovien;?>"><img src="anh/baiviet.png" height="16" width="16" border="0">&nbsp;</a>
			<a href="quanlybaiviet.php?magv=<? echo $magiaovien;?>">Quản lý bài viết</a>
		</td></tr>
		<tr><td valign="middle" height="30">
			<a href="quanlyhocsinhgv.php?magv=<? echo $magiaovien;?>"><img src="anh/user.png" height="16" width="16" border="0">&nbsp;</a>
			<a href="quanlyhocsinhgv.php?magv=<? echo $magiaovien;?>">Quản lý học sinh</a>
		</td></tr>
		<tr><td valign="middle" height="30">
			<a href="quanlyphuhuynhgv.php?magv=<? echo $magiaovien;?>"><img src="anh/phuhuynh.png" height="16" width="16" border="0">&nbsp;</a>
			<a href="quanlyphuhuynhgv.php?magv=<? echo $magiaovien;?>">Quản lý phụ huynh</a>
		</td></tr>
		<tr><td valign="middle" height="30">
			<a href="quanlyanhgv.php?magv=<? echo $magiaovien;?>"><img src="anh/album.png" height="16" width="16" border="0">&nbsp;</a>
			<a href="quanlyanhgv.php?magv=<? echo $magiaovien;?>">Quản lý ảnh upload</a>
		</td></tr>
		<tr><td valign="middle" height="30">
			<a href="quanlytailieugv.php?magv=<? echo $magiaovien;?>"><img src="anh/tailieuupload.png" height="16" width="16" border="0">&nbsp;</a>
			<a href="quanlytailieugv.php?magv=<? echo $magiaovien;?>">Quản lý tài liệu</a>
		</td></tr>
		<? }?>
		<!--End menu giao vien chu nhiem-->				
		</table>
		<!-- het menu trai-->
		</td>
		
    <td align="center" valign="top"><!-- InstanceBeginEditable name="EditRegion3" -->
	<?
		$mahs=$_REQUEST["mahs"];
		$mal=$_REQUEST["mal"];
		$result=mysql_query("select * from hocsinh where mahs='{$mahs}'");
		$r=mysql_fetch_array($result);
				
	?>
	<!--Begin danh sach hoc sinh-->
				<div class="gift_box_quatang">
					<div class="gift_quatang_topblog">
						<p class="gift_quatang_fl_left"><img src="anh/space.gif"></p>
						<p class="gift_quatang_fl_right"><img src="anh/space.gif"></p>
					</div>
					<div class="gift_quatang_infoblog">
						
							<h1 align="center"><font color="#CC3333">Thông tin học sinh <? echo $r["hotendem"]."&nbsp;".$r["ten"];?></font></h1>
							<table align="center" cellpadding="4" cellspacing="0" border="0" width="98%">
							<tr>
							<td>
								<table align="center" cellpadding="2" cellspacing="0" border="0">
									<tr>
									<th align="right">Mã học sinh : </th>
									<td align="left"><? echo $r[0];?></td>
								</tr>		
								<tr>
									<th align="right">Họ tên học sinh : </th>
									<td align="left"><? echo $r["hotendem"]."&nbsp;".$r["ten"];?></td>
								</tr>
								<tr>
									<th align="right">Giới tính : </th>
									<td align="left">
										<?
										if($r["gioitinh"]==1){
											echo "Nam";
										}else{
											echo "Nữ";
										}
										?>
									</td>
									</tr>
									<tr>
										<th align="right">Lớp : </th>
										<td align="left">
										<?
											$result1=mysql_query("select * from lop where mal='{$r["mal"]}'");
											$r1=mysql_fetch_array($result1);
											echo $r1["tenl"];
										?>
										</td>
									</tr>
									<tr>
										<th align="right">Ngày sinh : </th>
										<td align="left"><? echo $r["ngaysinh"];?></td>
									</tr>
									<tr>
										<th align="right">Địa chỉ : </th>
										<td align="left"><? echo $r["diachi"];?></td>
									</tr>	
									
									</table>
								</td>
							<td align="center" valign="top" width="120">
								<div style=" border:1px solid #EEEEEE; padding:5px;">
								<img src="thumb.php?h=130&w=116&url=anhhocsinh/<? echo $r["anh"];?>" border="0"/>
								</div>
							</td>
							</tr>
																		
							</table>						
						<!-- 
						<div class="gift_quatang_mView">
							<span style="float:left; width:90px;"> 
							</span>
							<span style=" float: right; width:100px" >																		
			
							</span>
						</div>
						-->
					</div>
					<div class="gift_quatang_btmblog">
						<p class="gift_quatang_bl_left"><img src="anh/space.gif"></p>
						<p class="gift_quatang_bl_right"><img src="anh/space.gif"></p>
					</div>			
				</div>
		<!--End danh sach hoc sinh-->			
	<!-- InstanceEndEditable --></td>
	<!--menu phai-->
	<td width="175" valign="top" align="center">
		<!--Begin-->
				<div class="panelgv">
					<div class="gift_quatang_topblog">
						<p class="gift_quatang_fl_left"><img src="anh/space.gif"></p>
						<p class="gift_quatang_fl_right"><img src="anh/space.gif"></p>
					</div>
					<div class="noidungpanelgv">
						<h1 align="left">Album ảnh</h1>
						<table align="center" width="100%" cellpadding="2" cellspacing="0" border="0">
						<?
						$resu2=mysql_query("select * from albumtruong where nguoidang='{$magiaovien}' order by thoigian DESC limit 0,3");
						while($row2=mysql_fetch_array($resu2)){						
						?>	
							<tr><td class="tieude3"><a href="chitietalbumcuagiaovien.php?maalbum=<? echo $row2["maalbum"];?>">
										<img src="anh/1px.gif" height="15" width="16" border="0">
									</a>
									<a href="chitietalbumcuagiaovien.php?maalbum=<? echo $row2["maalbum"];?>">
										<?
											echo $row2["tenalbum"];
										?>
									</a>
							</td></tr>																					
						<? }?>
						<?
						$resu3=mysql_query("select * from albumlop where nguoidang='{$magiaovien}' order by thoigian DESC limit 0,3");
						while($row3=mysql_fetch_array($resu3)){						
						?>	
							<tr><td class="tieude3"><a href="chitietalbumcuagiaovien.php?maalbum=<? echo $row2["maalbum"];?>">
										<img src="anh/1px.gif" height="15" width="15" border="0">
									</a>
									<a href="chitietalbumcuagiaovien.php?maalbum=<? echo $row3["maalbum"];?>">
										<?
											echo $row3["tenalbum"];
										?>
									</a>
							</td></tr>																					
						<? }?>
						</table> 
						<div class="gift_quatang_mView">
							<span style="float:left; width:70px;">	
							<a href="tatcaalbumgv.php">
							Xem tất cả
							</a>						
							</span>
							<span style=" float: right;">														
							</span>
						</div>
					</div>
					<div class="gift_quatang_btmblog">
						<p class="gift_quatang_bl_left"><img src="anh/space.gif"></p>
						<p class="gift_quatang_bl_right"><img src="anh/space.gif"></p>
					</div>			
				</div>
	</td>		
	</tr>
	<tr><td colspan="3" align="center" valign="middle" bgcolor="#999999" height="100">Phạm Đức Đóa - Khoa CNTT - Đại học Xây Dựng</td></tr>
</table>
</body>
<!-- InstanceEnd --></html>
